import {createRouter, createWebHashHistory} from 'vue-router'
import pc from '@/views/pc.vue'
import mobile from "@/views/mobile";
import camera_card from "@/views/pc/camera_card.vue";
import default_area from "@/views/pc/default_area.vue";
import quadruped from "@/views/mobile/quadruped.vue";
import cam_quadruped from "@/views/mobile/cam_quadruped.vue";
import cam_car from "@/views/mobile/cam_car.vue";
import dev_list from "@/views/mobile/dev_list.vue";
import camera from "@/views/mobile/camera.vue";
import dev_account from "@/views/pc/dev_account.vue";
import user from "@/views/pc/user.vue";
import login from "@/views/mobile/login.vue";
import settings from "@/views/mobile/settings.vue";
import pc_settings from "@/views/pc/pc_settings.vue";
import servo_switch from "@/views/mobile/servo_switch.vue";

const routes = [
    {
        path: '/pc',
        name: 'Home',
        component: pc,
        children: [
            {
                path: 'camera',
                name: 'camera',
                component: camera_card,

            },
            {
                path: 'default_area',
                name: 'default_area',
                component: default_area,
            },
            {
                path: 'dev_account',
                name: 'dev_account',
                component: dev_account,
            },
            {
                path: 'user',
                name: 'user',
                component: user,
            }, {
                path: 'pc_settings',
                name: 'pc_settings',
                component: pc_settings,
            }
        ]
    },
    {
        path: '/m',
        name: 'mobile',
        component: mobile,
        children: [
            {
                path: 'cam_quadruped',
                component: cam_quadruped,
                name: 'CamQuadruped'
            },
            {
                path: 'cam_car',
                component: cam_car,
                name: 'camCar'
            },
            {
                path: 'camera',
                component: camera,
                name: 'Camera'
            },
            {
                path: 'quadruped',
                component: quadruped,
                name: 'quadruped'
            },
            {
                path: 'dev_list',
                component: dev_list,
                name: 'dev_list'
            }, {
                path: 'login',
                component: login,
                name: 'login'
            }, {
                path: 'settings',
                component: settings,
                name: 'settings'
            },
            {
                path: 'ServoSwitch',
                component: servo_switch,
                name: 'ServoSwitch'
            }
        ]
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
